package org.gap.domain;

import java.io.Serializable;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class TiersRibPK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public TiersRibPK() {
	}

	/**
	 */

	@Column(name = "TRB_TIERS", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer trbTiers;
	/**
	 */

	@Column(name = "TRB_RIB", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer trbRib;

	/**
	 */
	public void setTrbTiers(Integer trbTiers) {
		this.trbTiers = trbTiers;
	}

	/**
	 */
	public Integer getTrbTiers() {
		return this.trbTiers;
	}

	/**
	 */
	public void setTrbRib(Integer trbRib) {
		this.trbRib = trbRib;
	}

	/**
	 */
	public Integer getTrbRib() {
		return this.trbRib;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((trbTiers == null) ? 0 : trbTiers.hashCode()));
		result = (int) (prime * result + ((trbRib == null) ? 0 : trbRib.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof TiersRibPK))
			return false;
		TiersRibPK equalCheck = (TiersRibPK) obj;
		if ((trbTiers == null && equalCheck.trbTiers != null) || (trbTiers != null && equalCheck.trbTiers == null))
			return false;
		if (trbTiers != null && !trbTiers.equals(equalCheck.trbTiers))
			return false;
		if ((trbRib == null && equalCheck.trbRib != null) || (trbRib != null && equalCheck.trbRib == null))
			return false;
		if (trbRib != null && !trbRib.equals(equalCheck.trbRib))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("TiersRibPK");
		sb.append(" trbTiers: ").append(getTrbTiers());
		sb.append(" trbRib: ").append(getTrbRib());
		return sb.toString();
	}
}
